﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Course 的摘要说明
/// </summary>
public class Course:MyObject
{

    //课程名
    private string cname;
    //学分
    private int credit;
    //课时
    private int classhour;
    //类别
    private string type;
    //地点
    private string place;
    //时间
    private string time;
    //授课老师
    private string tname;
    public Course()
    {
    }

    public Course(string cname, int credit, int classhour, string type, string place, string time,string tname)
    {
        this.cname = cname;
        this.credit = credit;
        this.classhour = classhour;
        this.type = type;
        this.place = place;
        this.time = time;
        this.tname = tname;
    }

    public string getCname()
    {
        return cname;
    }

    public int getCredit()
    {
        return credit;
    }

    public int getClasshour()
    {
        return classhour;
    }

    public string getType()
    {
        return type;
    }

    public string getPlace()
    {
        return place;
    }

    public string getTime()
    {
        return time;
    }
    public string getTname()
    {
        return tname;
    }

    public void setCname(string cname)
    {
        this.cname = cname;
    }

    public void setCredit(int credit)
    {
        this.credit = credit;
    }

    public void setClasshour(int classhour)
    {
        this.classhour = classhour;
    }

    public void setType(string type)
    {
        this.type = type;
    }

    public void setPlace(string place)
    {
        this.place = place;
    }

    public void setTime(string time)
    {
        this.time = time;
    }
    public void setTname(string tname)
    {
        this.tname = tname;
    }

    public string toString()
    {
        return "{" +
        "\"cname\":\"" + cname + "\"" +
        ", \"credit\":" + credit +
        ", \"classhour\":" + classhour +
        ", \"type\":\"" + type + "\"" +
        ", \"place\":\"" + place + "\"" +
        ", \"time\":\"" + time + "\"" +
        ", \"tname\":\"" + tname + "\"" +
        "}";
    }
}